In the past, an image processing technique has been utilized to recognize an alignment mark such as letters or symbols given on an object to be inspected. In this method, a surface image (a gray-scale image) of the object is converted to a binary image according to an appropriate threshold value. Since the alignment mark has a different concentration from a background, pixels corresponding to the alignment mark can be extracted from the pixels of the background.
However, this process of generating the binary image has a problem that when a concentration (brightness) of the alignment mark is not constant in the surface image, a part of the alignment mark can be not extracted, or a part of the background is erroneously extracted together with the alignment mark. As a result, since the generated binary image includes incorrect image data, the alignment mark can not be recognized from the binary image with a high degree of accuracy.
Such a problem will become a reality in the case of recognizing an alignment mark given on an optically transparent or translucent substrate in a manufacturing process of liquid-crystal display devices. For example, as shown in FIGS. 12A and 12B or FIGS. 13A and 13B, when a surface image 30 of the substrate having an alignment mark AM (“+” mark) is taken through a translucent film placed on the substrate by an image pickup unit, it is very difficult to recognize the alignment mark from the surface image with reliability because of a poor contrast between the alignment mark and the background, and the influence of undesired air bubbles AB trapped between the translucent film and the substrate.
To improve the recognition accuracy, it is also proposed to repeatedly perform a recognition treatment to an extracted edge of the alignment mark. However, there is a case that the recognition accuracy can not be sufficiently improved even when the recognition treatment is repeatedly performed. In such a case, the alignment mark must be detected by a visual inspection. This brings a reduction in production efficiency and an increase in production cost.
In addition, when an air bubble(s) AM is trapped at the vicinity of the alignment mark between the translucent film and the substrate, there is a case that light irradiated to the substrate to take the surface image by the image pickup unit is reflected at a surface of the translucent film inflated by the air bubble, so that a part of the alignment mark is lost from the surface image. In this case, the alignment mark can not be recognized by carrying out normalized correlation with use of, as a reference image, a characteristic portion of the alignment mark extracted by a binary-image processing technique, or a general view of the alignment mark obtained by a gray-scale image processing technique. Even when the alignment mark is recognized, the reliability of recognition results will be low.